package com.okq.entity;

import com.okq.entity.base.BaseEntity;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * 描述 : 系统日志表实体类
 * 作者 : zdl
 * 日期 : 2017/6/27 17:30
 */
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "tb_log")
public class Log extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 8197237985191518047L;
    /**
     * 用户名
     */
    @Column(name = "userName", length = 40)
    private String userName;
    /**
     * 登录名
     */
    @Column(name = "loginName", length = 40)
    private String loginName;
    /**
     * 模块
     */
    @Column(name = "module", length = 40)
    private String module;
    /**
     * 日志类型  0：未知 1：登陆 2：操作 3：错误
     */
    @Column(name = "type")
    private Integer type;
    /**
     * 日志内容
     */
    @Column(name = "content")
    private String content;
    /**
     * 创建时间
     */
    @Column(name = "createTime")
    private Timestamp createTime;
    /**
     * 是否删除0：未删除1：已删除
     */
    @Column(name = "isDelete")
    private Integer isDelete;

    /* ----------------- 查询条件 ----------------- */
    @Transient
    private String queryName;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public String getQueryName() {
        return queryName;
    }

    public void setQueryName(String queryName) {
        this.queryName = queryName;
    }
}
